package acWing;

import java.util.Arrays;
import java.util.Scanner;

public class _01ABC {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int[] nums = new int[7];
        for (int i = 0;i < 7;i++){
            nums[i] = scanner.nextInt();
        }
        scanner.close();
        Arrays.sort(nums);
        System.out.println(nums[0] + " " + nums[1] + " "+ (nums[6]-nums[0]-nums[1]));
    }
}
